<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>生命周期函数</title>
</head>
<body>
    <div id="app">
        <h1>{{ message }}</h1>
    </div>

    <script type="text/javascript" src="../js/vue.min.js"></script>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                message: 'Vue的生命周期'
            },
            created: function () {
                console.group('-------- created创建完毕状态 ----------');
                console.log("el: " + this.$el);
                console.log("data: " + this.$data);
                console.log("message: " + this.message);
            },
            beforeMount: function () {
                console.group('-------- beforeMount挂截前状态 --------');
                console.log("el: " + this.$el);
                console.log("data: " + this.$data);
                console.log("message: " + this.message);
            }
        })
    </script>
</body>
</html>